//
//  wfSocket.h
//  智能控制系统
//
//  Created by Rankin on 15/9/18.
//
//

#import <Cordova/CDV.h>


@interface wfSocket : CDVPlugin{
    NSMutableDictionary *udp_pool;
    NSMutableDictionary *tcp_pool;
    NSMutableDictionary *tcp_send_pool;
    NSMutableDictionary *udp_send_pool;
}


-(void) listenOnPort: (CDVInvokedUrlCommand *) command;
-(void) stopListenOnPort: (CDVInvokedUrlCommand *) command;
-(void) getConnectedList: (CDVInvokedUrlCommand *) command;
-(void) deConnectChild: (CDVInvokedUrlCommand *) command;


-(void) connect: (CDVInvokedUrlCommand *) command;
-(void) disconnect: (CDVInvokedUrlCommand *) command;
-(void) getPiList:(CDVInvokedUrlCommand *) command;


-(void) disconnectAll: (CDVInvokedUrlCommand *) command;
-(void) isConnected: (CDVInvokedUrlCommand *) command;
-(void) send: (CDVInvokedUrlCommand *) command;

-(BOOL) disposeConnection :(NSString *)key;

@end